import Vue from 'vue';
import App from './App.vue';
import i18n from './languages';
import router from './routes';
import store from './stroes';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
// import "babel-polyfill";
// import Es6Promise from 'es6-promise' 
// require('es6-promise').polyfill() 
// Es6Promise.polyfill()


import vueSwiper from 'vue-awesome-swiper'
import './assets/css/swiper.css'
Vue.use(vueSwiper)

Vue.config.productionTip = false;

Vue.use(ElementUI, {
  size: 'small',
  i18n: (key, value) => i18n.t(key, value)
});

router.beforeEach((to, from, next) => {
  // document.title = to.meta.title;
  document.title = '嗨崖'
  next();
});

window.app = new Vue({
  store,
  router,
  i18n,
  render: h => h(App),
}).$mount('#app');
